Skip to content

feat: add Monad Testnet #14963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 13, 2025
Merged

feat: add Monad Testnet #14963

merged 18 commits into from
May 13, 2025

Conversation

stanleyyconsensys
Copy link
Contributor

@stanleyyconsensys stanleyyconsensys commented Apr 29, 2025

Description

This PR is to add Monad Testnet as default network

It also include a migration script to add/replace the Monad testnet network for existing user

Change:

  • Bump controller-utils from 11.7.0 to 11.8.0
  • Bump network-controller from 23.2.0 to 23.4.0
  • Add Monad Testnet to default network via NetworkController options - additionalDefaultNetworks
  • Add migration script to replace/add Monad Testnet to the NetworkController state
  • Update Unit Test for Monad Testnet

Related issues

Fixes:

Manual testing steps

  1. Setup a new wallet
  2. Click on network menu and show test networks
  3. You will see Sepolia , Linea Sepolia , Mega Testnet, Monad Testnet on test networks section
  4. Click on Monad Testnet to switch the network
  5. Send a transaction
  6. Check the transaction result in the explorer

Screenshots/Recordings

Before

After

image image image

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@stanleyyconsensys stanleyyconsensys self-assigned this Apr 30, 2025
@stanleyyconsensys stanleyyconsensys changed the title feat: add monad testnet feat: add Monad Testnet Apr 30, 2025
stanleyyconsensys added a commit to MetaMask/core that referenced this pull request May 6, 2025
…ls` (#5724)

## Explanation

<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:

* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
* Are there any changes whose purpose might not obvious to those
unfamiliar with the domain?
* If your primary goal was to update one package but you found you had
to update another one along the way, why did you do so?
* If you had to upgrade a dependency, why did you do so?
-->

This PR is to add Monad Testnet as default network on
`network-controller` default state - `networkConfigurationsByChainId`
with the constants and type from the latest `controller-utils`

### Changes:

- Refactor `network-controller`
methods`getDefaultCustomNetworkConfigurationsByChainId` to build the
configuration from `CustomNetworkType` instead of hardcode network 1 by
1

- Add `Monad Testnet` info into `controller-utils`
- Include `Monad Testnet` into `network-controller` method
`getDefaultCustomNetworkConfigurationsByChainId`

Integration PR in mobile:
MetaMask/metamask-mobile#14963

<img width="300" alt="image"
src="https://github.com/user-attachments/assets/5f4b5bd7-d4f2-4edb-9e03-43b08206276a"
/>


## References

<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?

For example:

* Fixes #12345
* Related to #67890
-->

## Changelog

<!--
THIS SECTION IS NO LONGER NEEDED.

The process for updating changelogs has changed. Please consult the
"Updating changelogs" section of the Contributing doc for more.
-->

## Checklist

- [ ] I've updated the test suite for new or updated code as appropriate
- [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [ ] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs),
highlighting breaking changes as necessary
- [ ] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
Copy link

socket-security bot commented May 7, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​metamask/​controller-utils@​11.7.0 ⏵ 11.8.094 +110075 +196 +5100
Updatednpm/​@​metamask/​network-controller@​23.2.0 ⏵ 23.4.093 -110076 +198 +1100

View full report

@stanleyyconsensys stanleyyconsensys added the Run Smoke E2E Requires smoke E2E testing label May 7, 2025
@stanleyyconsensys stanleyyconsensys marked this pull request as ready for review May 7, 2025 13:30
@stanleyyconsensys stanleyyconsensys requested a review from a team as a code owner May 7, 2025 13:30
Copy link
Contributor

github-actions bot commented May 7, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: c07264f
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/69819db3-1a07-4e21-a616-6364a8375a54

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@stanleyyconsensys stanleyyconsensys added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label May 7, 2025
@github-project-automation github-project-automation bot moved this to Needs dev review in PR review queue May 7, 2025
@stanleyyconsensys stanleyyconsensys removed the Run Smoke E2E Requires smoke E2E testing label May 8, 2025
@stanleyyconsensys stanleyyconsensys added the Run Smoke E2E Requires smoke E2E testing label May 8, 2025
Copy link
Contributor

github-actions bot commented May 8, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: f3d1765
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/e1a56356-ac55-48ca-b779-f8ecd51f5dd4

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@stanleyyconsensys stanleyyconsensys removed the Run Smoke E2E Requires smoke E2E testing label May 9, 2025
Copy link

sonarqubecloud bot commented May 9, 2025

@stanleyyconsensys stanleyyconsensys added the Run Smoke E2E Requires smoke E2E testing label May 9, 2025
Copy link
Contributor

github-actions bot commented May 9, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 5821c21
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/5de1b5aa-99ef-497d-bdb9-8e0dd1b494e4

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@vivek-consensys vivek-consensys added the QA Passed QA testing has been completed and passed label May 13, 2025
@khanti42 khanti42 enabled auto-merge May 13, 2025 07:39
@khanti42 khanti42 added this pull request to the merge queue May 13, 2025
@github-project-automation github-project-automation bot moved this from Needs dev review to Review finalised - Ready to be merged in PR review queue May 13, 2025
Merged via the queue into main with commit b5ed096 May 13, 2025
53 of 57 checks passed
@khanti42 khanti42 deleted the feat/add-monad-testnet branch May 13, 2025 10:34
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label May 13, 2025
@github-actions github-actions bot locked and limited conversation to collaborators May 13, 2025
@metamaskbot metamaskbot added the release-7.48.0 Issue or pull request that will be included in release 7.48.0 label May 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
QA Passed QA testing has been completed and passed release-7.48.0 Issue or pull request that will be included in release 7.48.0 Run Smoke E2E Requires smoke E2E testing team-network-enablement
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants